package cn.iotab.iotkit.transport.api.common.message.codec;

import cn.iotab.iotkit.transport.api.common.message.JsonQueueMsg;
import cn.iotab.iotkit.transport.api.common.message.TransportMsg;

public class JsonMsgEncoder {

    public <T extends TransportMsg> JsonQueueMsg<T> encode(String key, T msg) {
        if (msg == null) throw new NullPointerException("msg is null");
        return new JsonQueueMsg<T>(key, msg);
    }
}
